package es.battleship.model;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

import com.google.appengine.api.datastore.Key;

@XmlRootElement
@PersistenceCapable
public class ShipConfig {
	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key id;
	
	@Persistent
	private String name;
	
	@Persistent
	private Integer size;
	
	@Persistent
	private Integer number;
	
	
	public ShipConfig() {
	}
	
	
	@XmlTransient
	public Key getId() {
		return id;
	}



	public void setId(Key id) {
		this.id = id;
	}



	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Integer getSize() {
		return size;
	}
	public void setSize(Integer size) {
		this.size = size;
	}
	
	public Integer getNumber() {
		return number;
	}
	public void setNumber(Integer number) {
		this.number = number;
	}
	
	
	public String toString() {
		return "ShipConfig { Id: " 
				+ id 
				+ " name: " 
				+  name 
				+ " size: " 
				+ size
				+ " number: " 
				+ number 
				+ " }";
	}
	
}
